package jinyilw.tools.net.dev;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public final class SimpleCommandPacket extends CommandPacket
{
	private static final long serialVersionUID = 2820935673537149792L;
	public static final short ID = -253;

	public SimpleCommandPacket()
	{
	}

	public SimpleCommandPacket(short commandID)
	{

	}

	@Override
	public void read(DataInputStream input) throws IOException
	{
		commandID = input.readShort();
	}

	@Override
	public void write(DataOutputStream output) throws IOException
	{
		output.writeShort(commandID);
	}

	@Override
	public short getID()
	{
		return SimpleCommandPacket.ID;
	}

	@Override
	public String toString()
	{
		if (!NetworkConfig.DEBUG)
		{
			return super.toString();
		}

		return "SimpleCommandPacket: ";
	}

}
